// 10 bit Voltmeter

#include "../../ACUAS/ACUAS.h"
#include "../../ACUAS/ACUASlcd2.h"

PROGRAM_INIT
	VAR16(mvolt)

	ACTIVATE_ADC		
	ADC_CHANNEL(1)

	ACTIVATE_LCD	
	CLEAR_LCD

PROGRAM_START
	ADCONVERT_MV(mvolt)					// convert with 10 bit resolution,
										// calculate the appropriate voltage in mV and 
										// store the value in the variable mvolt

	LCD_XY(1,1)
	LCD_D_NUMBER(mvolt/1000.,4,2)		// display the converted voltage as a floating point number 
	LCD_TEXT(" Volt")

PROGRAM_END
